/*
 * ChatAck.cpp
 */

#include "ChatAck.h"

#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
using boost::property_tree::ptree;

vsznDefault(ChatAck);

ChatAck::ChatAck()
{
    // Default constructor is necessary for serialization
}

ChatAck::ChatAck(uint32_t messageId)
{
    this->messageId = messageId;
}

ChatAck::~ChatAck()
{
}

string ChatAck::getXml()
{
    ptree subtree;
    subtree.put("id", this->messageId);
    subtree.put("chat_to", this->chat_to);
    
    ptree root;
    root.put_child("chatack", subtree);
    
    ostringstream sstream;
    write_xml(sstream, root);
    return sstream.str();
}
